home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX 6.2 Applications 1996 May
/
SGI IRIX 6.2 Applications 1996 May.iso
/
dist
/
impr_dev.idb
/
usr
/
share
/
catman
/
p_man
/
cat3
/
scgetstatus.z
/
scgetstatus
Wrap
Text File
|
1996-05-06
|
5KB
|
133 lines
SSSSCCCCGGGGeeeettttSSSSttttaaaattttuuuussss((((3333)))) IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo SSSSCCCCGGGGeeeettttSSSSttttaaaattttuuuussss((((3333))))
NNNNAAAAMMMMEEEE
SCGetStatus, SCGetStatusFD - Get status information about a scanner
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
####iiiinnnncccclllluuuuddddeeee <<<<ssssttttddddiiiioooo....hhhh>>>>
####iiiinnnncccclllluuuuddddeeee <<<<ssssccccaaaannnnnnnneeeerrrr....hhhh>>>>
iiiinnnntttt SSSSCCCCGGGGeeeettttSSSSttttaaaattttuuuussss((((SSSSCCCCAAAANNNNNNNNEEEERRRR ****ssss,,,, SSSSCCCCSSSSTTTTAAAATTTTUUUUSSSS ****sssstttt))));;;;
iiiinnnntttt SSSSCCCCGGGGeeeettttSSSSttttaaaattttuuuussssFFFFDDDD((((SSSSCCCCAAAANNNNNNNNEEEERRRR ****ssss))));;;;
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
_S_C_G_e_t_S_t_a_t_u_s gets status information from a scanner driver.
_s specifies a connection to a scanner driver obtained from a call to
_S_C_O_p_e_n(3), _S_C_O_p_e_n_F_i_l_e(3), or _S_C_O_p_e_n_S_c_r_e_e_n(3).
SSSSCCCCSSSSTTTTAAAATTTTUUUUSSSS is defined in <_s_c_a_n_n_e_r._h> as follows:
enum scstate { SC_READY, SC_SCANNING, SC_ERROR };
typdef struct tag_scstatus {
enum scstate state;
int errno;
long curline;
int pass;
} SCSTATUS;
_s_t_a_t_e is SSSSCCCC____RRRREEEEAAAADDDDYYYY if the scanner is idle, waiting for commands. If a
scan is in progress, _s_t_a_t_e is SSSSCCCC____SSSSCCCCAAAANNNNNNNNIIIINNNNGGGG, and if an error has occurred
_s_t_a_t_e is SSSSCCCC____EEEERRRRRRRROOOORRRR and _e_r_r_n_o will be set to indicate the cause of the
error condition. _e_r_r_n_o takes on the same values that the global variable
_S_C_e_r_r_n_o does.
If _s_t_a_t_e is SSSSCCCC____SSSSCCCCAAAANNNNNNNNIIIINNNNGGGG, _c_u_r_l_i_n_e indicates the number of the last scan
line which was fully processed by the scanner driver, and _p_a_s_s indicates
which pass is currently being processed. During the first scanning pass
of a multiple pass scan, _p_a_s_s will be 0, during the second _p_a_s_s will be
1, etc.
_S_C_G_e_t_S_t_a_t_u_s_F_D returns a file descriptor which can be passed to the
_s_e_l_e_c_t(2) system call. When _s_e_l_e_c_t(2) indicates that the file descriptor
is ready for reading, the scanner driver has updated the scanning status.
Retrieve the status by calling _S_C_G_e_t_S_t_a_t_u_s; do NOT pass the file
descriptor returned from _S_C_G_e_t_S_t_a_t_u_s_F_D to any other system call.
_S_C_G_e_t_S_t_a_t_u_s_F_D provides a mechanism whereby it is not necessary for an
application to periodically call _S_C_G_e_t_S_t_a_t_u_s in a timer loop to detect
changes in scanner status.
PPPPaaaaggggeeee 1111
SSSSCCCCGGGGeeeettttSSSSttttaaaattttuuuussss((((3333)))) IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo SSSSCCCCGGGGeeeettttSSSSttttaaaattttuuuussss((((3333))))
RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
_S_C_G_e_t_S_t_a_t_u_s returns 0 if successful, or -1 if an error occurs.
_S_C_G_e_t_S_t_a_t_u_s_F_D returns a file descriptor if successful, or -1 if an error
occurs.
If either function returns -1, The global variable _S_C_e_r_r_n_o will be set to
indicate the reason for the error.
EEEEXXXXEEEECCCCUUUUTTTTIIIIOOOONNNN EEEERRRRRRRROOOORRRR CCCCOOOODDDDEEEESSSS
_S_C_G_e_t_S_t_a_t_u_s and _S_C_G_e_t_S_t_a_t_u_s_F_D will fail under the following
circumstances.
SCECOMM Error communicating with scanner driver
SCEDRVMSG Driver specific error. _S_C_E_r_r_o_r_S_t_r_i_n_g(3) will
return a custom message supplied by the scanner
driver
SSSSEEEEEEEE AAAALLLLSSSSOOOO
_l_i_b_s_c_a_n(3), _S_C_O_p_e_n(3), _S_C_S_c_a_n(3), _S_C_S_c_a_n_F_D(3).
PPPPaaaaggggeeee 2222